//
//  LCjockTbCell.m
//  TheLCNews
//
//  Created by apple on 15/11/27.
//  Copyright © 2015年 LC. All rights reserved.
//

#import "LCjockTbCell.h"

@implementation LCjockTbCell


#pragma mark 初始化方法
- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        [self createView];
    }
    return self;
}

- (void)createView{
    
    self.titleLabel = [[UILabel alloc] init];
    [self.contentView addSubview:self.titleLabel];
    
    self.titleLabel.numberOfLines = 0;
    // 可以自动适应文本内容
    [self.titleLabel sizeToFit];
    
    
    // 时间
    self.updateTimeLabel = [[UILabel alloc] init];
    [self.contentView addSubview:self.updateTimeLabel];
    
    self.updateTimeLabel.font = [UIFont systemFontOfSize:12.];
    self.updateTimeLabel.textColor = [UIColor grayColor];
    
    
    // 评论
    self.commentsallLabel = [[UILabel alloc] init];
    [self.contentView addSubview:self.commentsallLabel];
    
    self.commentsallLabel.font = [UIFont systemFontOfSize:12.];
    self.commentsallLabel.textColor = [UIColor grayColor];
    
}


- (void)layoutSubviews{
    [super layoutSubviews];
    self.titleLabel.frame = CGRectMake(CWIDTH / 30, KHEIGHT / 66.7, CWIDTH -10, 50);
    self.updateTimeLabel.frame = CGRectMake(CWIDTH / 30, 40, CWIDTH / 5, KHEIGHT / 9.3);
    self.commentsallLabel.frame = CGRectMake(CWIDTH / 1.363636363636, 40, CWIDTH / 5, KHEIGHT / 9.3);
    
}














/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

@end
